//
//  CNKIchanelCollectionViewCell.m
//  CNKICommunity
//
//  Created by wei on 17/3/28.
//  Copyright © 2017年 CNKI. All rights reserved.
//

#import "CNKIchanelCollectionViewCell.h"

@implementation CNKIchanelCollectionViewCell


-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        self.backgroundColor = [UIColor clearColor];
        
        UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height)];
        imageV.image = [UIImage imageNamed:@"navigationbarBackgroundWhite"];
        [self.contentView addSubview:imageV];
        _backImage = imageV;
        
        UILabel *Lab = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height)];
        Lab.backgroundColor = [UIColor clearColor];
        Lab.textAlignment = NSTextAlignmentCenter;
        Lab.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:Lab];
        _textLab = Lab;
        
        UIImageView *btn = [[UIImageView alloc]initWithFrame:CGRectMake(self.width - 20, 0, 20, 20)];
        btn.image = [UIImage imageNamed:@"close"];
        [self.contentView addSubview:btn];
        _deleteBtn = btn;
        _deleteBtn.hidden = YES;
        
    }
    return self;
}
-(void)setTheCellRightImageContent:(TopRightImageShowType)type
{
    _deleteBtn.hidden = YES;
    if (type == TopRightImageDelete_Show)
    {
        _deleteBtn.hidden = NO;
    }
    else
    {
        _deleteBtn.hidden = YES;
    }
}

@end
